<%--
  商品展示

  1、查询商品信息
  2、展示商品信息

--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.dsj.estore.entity.ProductEntity, com.dsj.estore.dao.ProductDao" %>
<%@ page import="java.util.List" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div style="width: 1024px; margin: 0 auto">
    <%
        ProductDao productDao = new ProductDao();
        List<ProductEntity> list = productDao.selectAllProduct();
    %>
    <%
        //5. 显示商品信息
        for(int i = 0; i < list.size(); i++) {
            ProductEntity e = list.get(i);
    %>
    <div><img src="/e13/productImages/<%= e.getPicture()%>"/></div>
    <div><%= e.getName()%></div>
    <div><%= e.getMarketPrice()%></div>
    <div><%= e.getDescription()%></div>
    <hr/>
    <%
        }
    %>
</div>
</body>
</html>
